//
//  BSWordViewController.m
//  BaiSiBuDeJie
//
//  Created by 王位 on 8/24/16.
//  Copyright © 2016 tsaievan. All rights reserved.
//

#import "BSWordViewController.h"

#import "BSWordNavigationController.h"

#import "UITextView+PlaceHolder.h"

#import "AddToolBarView.h"


@interface BSWordViewController ()

@property (weak, nonatomic) IBOutlet UITextView *wordTextView;

@end

@implementation BSWordViewController

//自定义类方法
+(instancetype)wordViewController
{
    UIStoryboard * storyboard = [UIStoryboard storyboardWithName:@"BSWrod" bundle:nil];
    
    BSWordViewController * viewC = storyboard.instantiateInitialViewController;
    
    
    
    
    return viewC;
}

- (IBAction)didClicCancel:(id)sender {
    
    
    [self.navigationController popViewControllerAnimated:YES];
    
}

-(void)viewWillAppear:(BOOL)animated
{
    
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.wordTextView becomeFirstResponder];
    
    [self.wordTextView addPlaceHolder:@"这里添加文字、请勿发布色情、政治等违反国家法律的内容。违者封号处理。"];
    
        [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blackColor]}];
    
    
    [self addToolBar];
    
    
}

-(void)addToolBar
{
    AddToolBarView * view = [AddToolBarView addToolBarView]
    ;
    
    
    self.wordTextView.inputAccessoryView = view;
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
